Optimizing Interrupt-Driven Embedded Software

نویسندگان

  • NATHAN COOPRIDER
  • JOHN REGEHR
چکیده

Software for embedded microcontroller units (MCUs) represents both an interesting opportunity and a difficult challenge for compiler optimization. Since these systems tend to be small—often limited to a few KB of on-chip RAM—highly aggressive techniques are feasible and worthwhile. On the other hand, the effectiveness of traditional dataflow analyses is limited by their inability to cope with interrupt-driven concurrency and the direct interaction of embedded software with hardware devices. We present an integrated collection of static analysis techniques that leads to effective, wholeprogram optimization of C code running on MCUs. Our first main contribution is a technique supporting whole-program dataflow analysis in the presence of interrupt-driven concurrency. This model is based on an automatic classification of each data element in a system based on its role in concurrent execution, followed by an analysis that efficiently approximates the effects of preemptions by interrupt handlers. Our second contribution is a technique for flowing data through volatile-qualified objects in MCU software, which can be backed by either RAM or device registers. We implemented our dataflow framework in a tool called cXprop. As a standalone optimizer, cXprop can reduce code size of sensor network programs based on TinyOS by 12%, while reducing their CPU usage by 8.3%. We have also used cXprop as a crucial enabler for two other projects. First, we used its analysis to drive offline RAM compression, reducing the RAM requirements of TinyOS applications by an average of 22%. Second, we used cXprop’s analysis of concurrency to greatly increase the efficiency of Safe TinyOS, our project to provide memory safety to sensor net applications.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Effective Verification for Low-Level Software with Competing Interrupts

Interrupts are a key design primitive for embedded software that interacts closely with hardware. The interrupt mechanism enables timely response to outside stimuli in a power-efficient way. Interrupts are common in all styles of computing platforms, including safety-critical embedded software, low-power mobile platforms, and high-end information systems. But interrupt-driven code is difficult ...

متن کامل

Interrupt Verification via Thread Verification

Most of the research effort towards verification of concurrent software has focused on multithreaded code. On the other hand, concurrency in low-end embedded systems is predominantly based on interrupts. Low-end embedded systems are ubiquitous in safety-critical applications such as those supporting transportation and medical automation; their verification is important. Although interrupts are ...

متن کامل

Safe and Structured Use of Interrupts in Real-Time and Embedded Software

While developing embedded and real-time systems, it is usually necessary to write code that handles interrupts, or code the interacts with interrupt handlers. Interrupts are indispensable because they use hardware support to reduce both the latency and overhead of event detection, when compared to polling. Furthermore, modern embedded processor cores can save energy by shutting down when idle, ...

متن کامل

Computing Laboratory ON SOFTWARE VERIFICATION FOR SENSOR NODES

We consider software written for networked, wireless sensor nodes, and specialize software verification techniques for standard C programs in order to locate programming errors in sensor applications before the software’s deployment on motes. Ensuring the reliability of sensor applications is challenging: low-level, interrupt-driven code runs without memory protection in dynamic environments. T...

متن کامل

Compiling for Resource-Constrained Platforms using ASSHes: Application- and System-Specific Heuristics

We present and evaluate applicationand system-specific heuristics (ASSHes) for optimizing embedded software. ASSHes are scripts that decide which compiler optimizations to apply; they make decisions using feedback from previous compilations, using the results of program analyses, and using high-level information, e.g., “there are only 4 KB of RAM, and interrupt handlers 5–7 should be fast since...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2008